home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
csounds
/
siren.c
< prev
next >
Wrap
Text File
|
1988-08-17
|
360b
|
25 lines
#define FALSE 0
#define TRUE 1
void siren()
{
int freq;
int done = FALSE;
do {
for (freq = 200; freq <= 1000; freq++) {
sound(freq);
delay(2);
}
for (freq = 1000; freq >= 200; freq--) {
sound(freq);
delay(2);
}
if (kbhit())
done = TRUE;
} while (!(done));
nosound();
}